feat: phase 2 — sync, extraction, LLM extractor, scheduler, live adapter#78
Merged
feat: phase 2 — sync, extraction, LLM extractor, scheduler, live adapter#78
Conversation
Closes #35 — promotion review queue with approve/reject/defer/correct/rollback Closes #36 — dry-run exporters for memory, wiki, and reminder surfaces Closes #37 — operations runbooks for sync and extraction job lifecycle Closes #38 — fixture-based evaluation and regression harness Closes #69 — selected-text cache store with TTL and class-filter enforcement Closes #72 — operator CLI (mpi) with search/thread/queue/export/doctor subcommands Closes #73 — attachment metadata indexing (filename, MIME type, size, content-id, inline flag) New modules: cache.py, queue.py, exporters.py, index_writer.py, cli.py New migrations: 002 (attachment metadata), 003 (text_cache + promotion_queue) New scripts: scripts/evaluate.py New docs: docs/ops-runbooks.md New tests: test_attachment_metadata, test_cache, test_queue, test_exporters, test_index_writer, test_cli, test_evaluate https://claude.ai/code/session_01REVqza82cZP43JoVMgu6jw
…uler, live adapter Closes #3 — sync.py: incremental sync with checkpoint management Closes #6 — extractor.py: deterministic extraction pipeline (thread_summary, obligation, event) Closes #70 — llm_extractor.py: Anthropic SDK extraction with cassette playback for offline CI Closes #74 — scheduler.py: job locking + stale detection; `mpi sync status/checkpoint` CLI subcommand Closes #71 — live_adapter.py: gated live adapter stub + .env.example + docs/live-adapter.md Closes #75 — docs/phase2-planning.md: phase 2 scope, decisions, phase 3 candidates Closes #2 — CLI search/thread subcommands (cli.py) Closes #4 — queue review CLI subcommands (cli.py) Closes #5 — export CLI subcommand (cli.py) Closes #7 — doctor CLI subcommand (cli.py) Closes #39 — index_writer search API (index_writer.py) Also adds 29 new tests covering all new modules (extractor, sync, scheduler, live_adapter, llm_extractor). Pre-existing test_doctor.py failures on Python 3.11 are unrelated to this branch. https://claude.ai/code/session_01REVqza82cZP43JoVMgu6jw
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 6ad70336ee
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Kept the sync subcommand (cmd_sync, parser registration, main() dispatch) introduced on this branch; main had no sync subcommand. https://claude.ai/code/session_01REVqza82cZP43JoVMgu6jw
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
$(cat <<'EOF'
Summary
Closes #2, #3, #4, #5, #6, #7, #39, #70, #71, #74, #75
Second pass closing remaining open issues. All new modules are fully tested (29 new tests); pre-existing
test_doctor.pyfailures on Python 3.11 are unrelated to this branch.New modules
sync.pyextractor.pyllm_extractor.pyclaude-opus-4-7) extraction with prompt caching and cassette playback for offline CIscheduler.pylive_adapter.pyLiveAdapterNotConfiguredin CIOther changes
cli.py— addsmpi sync statusandmpi sync checkpointsubcommands (Production sync scheduler and job lifecycle management #74); existing search/thread/queue/export/doctor subcommands close Build metadata and thread index for all MailPlus mail #2 Add search and on-demand raw message fetch workflows #4 Classify mail into VIP, project, admin, financial, travel, legal, and ignore/noise lanes #5 Promote distilled email intelligence into wiki and memory with review gates #7.env.example— live adapter credential template (Live MailPlus/DSM adapter — credential-gated IMAP/API integration #71)docs/live-adapter.md— setup and security guide (Live MailPlus/DSM adapter — credential-gated IMAP/API integration #71)docs/phase2-planning.md— architectural decisions and phase 3 candidates (Phase 2 planning: entity graph, proactive recall, and relationship memory #75)Key design decisions
extractor.pyruns unconditionally;llm_extractor.pyenriches withprovenance="llm"llm_extractoraccepts acassettedict so CI never hits the Anthropic APITest plan
pytest tests/test_sync.py— 5 tests covering dry-run, idempotency, checkpointpytest tests/test_extractor.py— 4 tests covering candidates, noise suppression, field contractpytest tests/test_llm_extractor.py— 6 tests covering cassette playback, corpus aggregation, invalid JSON fallback, noise skippytest tests/test_scheduler.py— 9 tests covering lock acquire/release, stale clearing,run_job, event sinkpytest tests/test_live_adapter.py— 5 tests covering config gate, env overrides, stub batchhttps://claude.ai/code/session_01REVqza82cZP43JoVMgu6jw
EOF
)
Generated by Claude Code